<template>
  <a-card :bordered="false">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <!--      <el-tab-pane :label="$t('mailTool.mailConfig')" name="mailConfig">-->
      <!--        <configMail ref="myConfigMail"/>-->
      <!--      </el-tab-pane>-->
      <el-tab-pane :label="$t('mailTool.sengMail')" name="sendMail">
        <sendMail/>
      </el-tab-pane>
      <el-tab-pane :label="$t('mailTool.mailHistory')" name="sendMailHistory">
        <sendMailHistory/>
      </el-tab-pane>
    </el-tabs>
  </a-card>
</template>

<script>
import sendMail from '@/components/systemTool/mailTool/sendMail'
import configMail from '@/components/systemTool/mailTool/configMail'
import sendMailHistory from '@/components/systemTool/mailTool/sendMailHistory'

export default {
  name: 'MailTool',
  components: {
    sendMail,
    configMail,
    sendMailHistory
  },
  data() {
    return {
      activeName: 'sendMail'
    }
  },
  mounted() {
  },
  methods: {
    handleClick(tab, event) {
      if (this.activeName === 'mailConfig') {
        this.$refs.myConfigMail.getMailConfig()
      }
    }
  }
}

</script>

<style scoped>
</style>
